package com.wzy;

/**
 * 单例模式
 * 之
 * 饿汉模式
 */
public class YourFactory {
    private static YourFactory factory = new YourFactory();

    private YourFactory() {
        System.out.println("创建了一个MyFactory");
    }

    public static YourFactory getInstance(){

        return factory;
    }
}
